package com.example.doctorstation.POJOMapper;

import java.util.List;

import com.example.doctorstation.POJOData.Bed;
import com.example.doctorstation.POJOData.InHospitalInfo;
import org.apache.ibatis.annotations.*;

@Mapper
public interface InHospitalInfoMapper {
    @Insert("INSERT into p_patient_inhospital_info(name,pidcard,sex,birthday, phone ,ismarried ,company ,profession ,linkman ,linkmantel, birthprovince ,birthcity, birthcounty ,birthaddress, registerprovince, " +
            "registercity ,registercounty, registeraddress, hostprovince, hostcity ,hostcounty ,hostaddress, indate, inid, inhosopitalnameE,indeptname, hospitalcardid ,premoney ,opdoctorname,opdiagnosename)"  +
            "values(#{name}, #{pidcard}, #{sex}, #{birthday}, #{ phone }, #{ismarried }, #{company }, #{profession }, #{linkman }, #{linkmantel}, #{ birthprovince }, #{birthcity}, #{ birthcounty }, #{birthaddress}, #{ registerprovince}," +
            "#{registercity }, #{registercounty}, #{ registeraddress}, #{ hostprovince}, #{ hostcity }, #{hostcounty }, #{hostaddress}, #{ indate}, #{ inid}, #{ inhosopitalnameE}, #{indeptname}, #{ hospitalcardid }, #{premoney }, #{opdoctorname}, #{opdiagnosename})")
    public int InsertInHospitalInfo(InHospitalInfo info);


    @Update("update p_patient_inhospital_info set inflagID = 2 where inHospitalInfoID = #{arg0} ")
    public Integer UpdateinflagID(Integer ID);
}